package com.example.add.ui

import android.os.Bundle
import androidx.fragment.app.Fragment
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.Button
import com.alibaba.android.arouter.launcher.ARouter
import com.chendechao.lib_base.BaseFragment
import com.example.add.R
import com.example.add.constant.RouteAddConstant

/**直播模块-直播片段类*/
class AddFragment : Fragment() {

    override fun onCreateView(
        inflater: LayoutInflater, container: ViewGroup?,
        savedInstanceState: Bundle?
    ): View? {
        // Inflate the layout for this fragment
        return inflater.inflate(R.layout.add_fragment_add, container, false)
    }

    override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
        super.onViewCreated(view, savedInstanceState)
        val toLiveButton : Button = view.findViewById(R.id.btn_start_live)
        // 跳转至直播活动类
        toLiveButton.setOnClickListener {
            ARouter.getInstance().build(RouteAddConstant.ROUTE_ADD_ACTIVITY).navigation()
        }
    }
}